package com.goldmantis.alitrip.mapper;

import com.goldmantis.alitrip.pojo.SysUserRole;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

/**
 * @author Administrator
 */
public interface SysUserRoleMapper extends Mapper<SysUserRole> {

    public List<Map> selectByRoleId(@Param("roleId") Long roleId, @Param("userId") Long userId,
                                       @Param("fullName") String fullName,
                                       @Param("account") String account,
                                       @Param("jobNumber") String jobNumber,
                                       @Param("posName") String posName,
                                       @Param("orgName") String orgName);

    public List<Map> selectNoRoleByRoleId(@Param("roleId") Long roleId, @Param("userId") Long userId,
                                       @Param("fullName") String fullName,
                                       @Param("account") String account,
                                       @Param("jobNumber") String jobNumber,
                                       @Param("posName") String posName,
                                       @Param("orgName") String orgName);


//    List<Long> getSelectedUserRoleInfoBySystemIdAndUserId(@Param("systemId") Long systemId,@Param("userId") Long userId);
//
//    List<Map> getUnSelectedUserRoleInfoBySystemIdAndUserId(@Param("systemId") Long systemId);

    List<Map> getRolesByUserId(Long userId);

    List<Map> getRoleCheckInfoBySystemIdAndUserId(@Param("systemId") Long systemId, @Param("userId")Long userId,@Param("category")String category);

    List<SysUserRole> getWithCategory(@Param("userId") Long userId, @Param("category") String category, @Param("systemId")Long systemId);

    void permissionCopy(@Param("originUserId") long originUserId,@Param("targetUserId") long targetUserId);
}